DPDK_CFLAGS = -m64 -mssse3 -D_GNU_SOURCE -D_REENTRANT
CFLAGS +=  -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DSPDK_CONFIG_RDMA -D__SSE2__ $(DPDK_CFLAGS) -fPIC -lpthread -laio -DHAVE_POLL_H -D_NVME_INFO_#-std=gnu99
INC = -I../include -I../common
CC = cc

all : ../nvme
	$(CC) $(CFLAGS) $(INC) -c ../nvme/nvme.c
	$(CC) $(CFLAGS) $(INC) -c ../nvme/nvme_admin.c
	$(CC) $(CFLAGS) $(INC) -c ../common/nvme_common.c
	$(CC) $(CFLAGS) $(INC) -c ../common/nvme_cpu.c
	$(CC) $(CFLAGS) $(INC) -c ../nvme/nvme_ctrlr.c
	$(CC) $(CFLAGS) $(INC) -c ../common/nvme_log.c
	$(CC) $(CFLAGS) $(INC) -c ../common/nvme_mem.c
	$(CC) $(CFLAGS) $(INC) -c ../nvme/nvme_ns.c
	$(CC) $(CFLAGS) $(INC) -c ../common/nvme_pci.c
	$(CC) $(CFLAGS) $(INC) -c ../nvme/nvme_qpair.c
	$(CC) $(CFLAGS) $(INC) -c ../nvme/nvme_quirks.c
	$(CC) $(CFLAGS) $(INC) -c ../nvme/nvme_request.c
	$(CC) $(CFLAGS) $(INC) -c ../info/nvme_info.c -D__SELFT_APP__

	$(CC) -o nvme_info *.o -lrt -Wall -ldl -lpthread -lpciaccess -lnuma